package com.fjec.market.service;

import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.baomidou.mybatisplus.extension.service.IService;
import com.fjec.common.protocol.JsonResult;
import com.fjec.market.entity.InfoPurchase;

import java.util.List;
import java.util.Map;

/**
 * <p>
 * 006.采购商表 服务类
 * </p>
 *
 * @author admin
 * @since 2020-09-07
 */
public interface IInfoPurchaseService extends IService<InfoPurchase> {
    List<InfoPurchase> getInfoPurchaseByMarkCode(Integer markCode, Page page);

    List<InfoPurchase> getPurchasesByPurchaseIdsAndMarkCode(int markCode, List<Long> purchaseIds, Page page);

    Map<String, Object> getPurchaseByUserId(Long userId);

    JsonResult savePurchase(InfoPurchase purchase, String markCodes, Long picId, Long headPicId, Object verifyCode);

    /**
     * 获取需要生成shopNum的采购商列表
     *
     * @return
     */
    List<InfoPurchase> getPurchaseForShopNumGen(int limit, int minutes);

    List<InfoPurchase> getPurchaseByShopNumAndMarkCode(int markCode, Long shopNum);
}
